package com.kc.business.service.impl;

import com.kc.business.domain.BizPublicPlace;
import com.kc.business.domain.dto.BizPublicPlaceDTO;
import com.kc.business.mapper.BizPublicPlaceMapper;
import com.kc.business.service.IBizPublicPlaceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 公共场所service impl
 */
@Service
public class BizPublicPlaceServiceImpl implements IBizPublicPlaceService {
    @Resource
    private BizPublicPlaceMapper bizPublicPlaceMapper;

    /**
     * 数据新增
     * @param bizPublicPlace
     * @return
     */
    @Override
    public Integer add(BizPublicPlace bizPublicPlace) {
        return bizPublicPlaceMapper.insert(bizPublicPlace);
    }

    /**
     * 数据编辑
     * @param bizPublicPlace
     * @return
     */
    @Override
    public Integer update(BizPublicPlace bizPublicPlace) {
        return bizPublicPlaceMapper.updateByPrimaryKey(bizPublicPlace);
    }

    /**
     * 列表
     * @param bizPublicPlaceDTO
     * @return
     */
    @Override
    public List<BizPublicPlaceDTO> getList(BizPublicPlaceDTO bizPublicPlaceDTO) {
        return bizPublicPlaceMapper.getPlaceList(bizPublicPlaceDTO);
    }
}
